package isp.apps.example.shoppingcart.persistence;

import isp.apps.example.shoppingcart.domain.Item;

import java.util.List;

public interface ItemDirectory
{
  /**
   * @return
   */
  public List getItems();

  /**
   * @param id
   * @return
   */
  public Item getItem(Integer id);

  /**
   * @param sku
   * @return
   */
  public Item getItemBySku(String sku);

  /**
   * @return
   */
  public List getValidItems();

  /**
   * @return
   */
  public List getInvalidItems();

  /**
   * @return
   */
  public List getValidInStockItems();

  /**
   * @return
   */
  public List getValidOutOfStock();


  /**Returns a list of Items (Item Objects) that are currently out of stock.  Query is defined in item.hbm.xml 
   * and uses the 
   * @return
   */
  public List getOutOfStockItems();


  /**Returns a list of Items (Item Objects) that are currently in stock.  Query is defined in item.hbm.xml and 
   * uses the valid flag which is an integer 1 or 0.  May eventually be eliminated in favor of using the 
   * invalidDate flag which is a timestamp for when an item is discontinued or invalidated.
   * @return List of in stock items.
   */
  public List getInStockItems();

  /**
   * @param count
   * @return
   */
  public List getItemsByInventoryCount(Integer count);

  /**Given a inventory count, will return a list of all items
   * that have an inventory as many or less than the count.  This allows for negative inventory
   * which may designate a "backordered item"
   * @param count desired count threshold
   * @return List of Item Objects
   */
  public List getItemsBelowInventoryCount(Integer count);
  
}
